<template>
    <!-- {{accumulate}}
    {{education}} -->
    <ul>
        <li v-for="item in Clothes" :key="item.id">
            <span>{{item.product}}</span>
            <span>{{item.price}}</span>
        </li>
    </ul>
</template>
<script lang="ts" setup>
//defineProps define(宏函数)
import {defineProps,withDefaults} from 'vue';
import {type StandardList} from '@/types';
//只接收List
// defineProps(['accumulate','education'])
//接收List+类型限制(必要性限制)
// defineProps<{Clothes?:StandardList}>()
//接收List+类型限制(必要性限制)+指定默认值
withDefaults(defineProps<{Clothes?: StandardList}>(), {
    Clothes: () => [{id:1,product: 'T-shirt', price: 50}]
})
</script>